﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<GlassStore.ViewModels.SubCatalogueBrowseViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	二级目录
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>二级目录列表:<%:Model.TopCatalogue.Name %></h2>
    
    <table>
        <tr>
            <th>操作</th>
            <th>
                目录名
            </th>
            <th>
                描述
            </th>
            <th>
                图片
            </th>
        </tr>

    <% foreach (var item in Model.SubCatalogues) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("编辑", "EditSub", new { id=item.SubCatalogueId }) %> |
                <%: Html.ActionLink("删除", "DeleteSub", new { id = item.SubCatalogueId })%>
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: item.Description %>
            </td>
            <td>
                <img src="<%:item.PictureURL %>" alt="没有图片" width="122" height="40"/>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("添加", "CreateSub", new { topId=Model.TopCatalogue.TopCatalogueId})%> |
		    <%: Html.ActionLink("返回顶级目录列表", "Index")%>
    </p>

</asp:Content>
